#include <iostream>
#include <regex>
#include <string>
using namespace std;

/*
 * regex
 *regex_match  将一个字符序列与一个正则表达式匹配
 * regex_search 寻找第一个与正则表达式匹配的子序列
 * regex_replace
 * sregex_iterator
 * smatch
 * ssub_match
 * 
 * 
 */


void test(){

    string pattern("[^c]ei");
    pattern="[[:alpha:]]*"+pattern+"[[:alpha:]]*";

    regex r(pattern);

    smatch results;         //定义一个对象保存结果
    string str="recipt friend theif receive";
    if(regex_search(str,results,r)){
        cout<<results.str()<<endl;
    }



}